#include <iostream>
using namespace std;
int main()
{
    int max = 0;
    int count = 0;
    int nums[] = { 1,1,0,1,1,1 };
    int numsSize = sizeof(nums) / sizeof(nums[0]);
    for (int i = 0; i < numsSize; i++)
    {
        if (nums[i] == 1)
        {
            count++;
            if (count > max)
            {
                max = count;
            }
        }
        else
            count = 0;
    }
    cout << max << endl;
}